// Copyright 2021 Guoyoko. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "Widgets/SCompoundWidget.h"
#include "SlateBasics.h"


/*-> Placement panel unit*/
class FPlacePanelItem
{

public:
	FPlacePanelItem(FName _ItemName, const FSlateBrush* _ItemIcon = nullptr) :
		ItemName(_ItemName),
		ItemIcon(_ItemIcon)
	{
	}
 

public:
	FName ItemName;
	const FSlateBrush* ItemIcon;

};


/*-> Placement panel widget*/
class SSWPlacePanelContainer : public SCompoundWidget
{
public:
	SLATE_BEGIN_ARGS(SSWPlacePanelContainer)
	{}
	SLATE_END_ARGS()

	void Construct(const FArguments& InArgs);

	void Initialize();

private:
	TSharedRef<class ITableRow> OnGenerateRowForList(TSharedPtr<FPlacePanelItem> InItem, const TSharedRef<STableViewBase>& OwnerTable);
	void OnPlacePanelItemClicked(TSharedPtr<FPlacePanelItem> PlacePanelItem);

private:

	TArray<TSharedPtr<FPlacePanelItem>> PlaceListSource;

};